﻿using System;

namespace SimpleClient
{
    public class LoginModel
    {
        private bool CheckInput(string userName, string passWord)
        {
            if (userName == "" || passWord == "")
            {
                Console.WriteLine("用户名和密码不能为空！");
                return false;
            }
            return true;
        }

        public bool Login(string userName, string passWord)
        {
            try
            {
                if (!CheckInput(userName, passWord))
                {
                    Console.WriteLine("用户名密码输入不正确");
                    return false; ;
                }
                return true;

            }
            catch (Exception ex)
            {
                Console.WriteLine("登录失败"+ex);
                return false; ;
            }
        }
    }
}
